﻿(function () {

    $(function () {
        

        //hideOnSomePages();


        $('.top-hint-close-button').click(function () {
            hideTopHint();
        });

        $('.top-hint-mainPart').click(function (event) {
            event.preventDefault();
            //$.getJSON('/TopHint/CloseHint', {}, function (data) {
            //    if (data.status === 'ok') {
            //        window.location.href = "/geekband/kickoff";
            //    }
            //})
            //window.location.href = "/course";
            window.location.href = "http://boolan.com/jjhou/event/201511";
        });
    });


    function hideTopHint() {
        $.getJSON('/TopHint/CloseHint', {}, function (data) {
            if (data.status === 'ok') {
                $('#top-hint').hide();
            }
        })
    }


    function hideOnSomePages()
    {
        var geekbandPattern = /\/geekband/i;


        if(window.location.pathname == "/" ||
            geekbandPattern.test(window.location.pathname)){
            $('#top-hint').hide();
        }
    }

})();